package com.xuerhua.yxt.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;

import java.util.Map;

/**
 * @author huhekun
 * @date 2019/12/31
 */
public class MapUtils {

    /**
     * @author huhekun
     * @date 2019/12/31
     * @description 把Bean对象转换成Map
     */
    public static Map<String, Object> objectMap(Object object)throws IllegalAccessException{
        Map<String,Object> map = JSON.parseObject(JSON.toJSONString(object), new TypeReference<Map<String,Object>>(){});
        return map;
    }

    /**
     * @author huhekun
     * @date 2019/12/31
     * @description 把List转换成Map
     */
}
